package com.gupaowork.pattern.observer.guava;

import com.google.common.eventbus.EventBus;
import com.gupaowork.pattern.observer.Question;

/**
 * @Author heweicheng
 * @Date 2020/10/4
 */
public class GuavaEventTest {
    public static void main(String[] args) {
        EventBus eventBus = new EventBus();
        GuavaTeacher guavaTeacher = new GuavaTeacher("Tom");
        eventBus.register(guavaTeacher);
        Question question = new Question();
        question.setContent("请问老师适配器模式和装饰器模式有什么区别？");
        question.setName("harry");
        eventBus.post(question);
    }
}
